package com.xywy.tangandroid.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.xywy.tangandroid.R;
import com.xywy.tangandroid.base.BaseActivity;

/**
 * 消息盒子
 */
public class MssageBoxAct extends BaseActivity {
	private RelativeLayout left_img;
	private TextView middle_title;
	private TextView right_title;
	private ImageView right_img;
	private RelativeLayout online_questin_mesage_relat;
	private RelativeLayout system_message_relat;

	@Override
	protected void initView(Bundle savedInstanceState) {
		setContentView(R.layout.act_message_box);
		left_img = (RelativeLayout) findViewById(R.id.left_img);
		middle_title = (TextView) findViewById(R.id.middle_title);
		right_title = (TextView) findViewById(R.id.right_title);
		right_img = (ImageView) findViewById(R.id.right_img);
		middle_title.setText(R.string._message_box);
		right_img.setVisibility(View.VISIBLE);

		online_questin_mesage_relat = (RelativeLayout) findViewById(R.id.online_questin_mesage_relat);
		system_message_relat = (RelativeLayout) findViewById(R.id.system_message_relat);

	}

	@Override
	protected void initListener() {
		left_img.setOnClickListener(this);
		right_img.setOnClickListener(this);
		online_questin_mesage_relat.setOnClickListener(this);
		system_message_relat.setOnClickListener(this);
	}

	@Override
	protected void initData() {

	}

	@Override
	public void onClick(View v) {
		super.onClick(v);
		switch (v.getId()) {
		case R.id.left_img:
			finish();
			break;
		case R.id.online_questin_mesage_relat:
			Intent intent = new Intent(this, OnlineMessageAct.class);
			startActivity(intent);
			break;
		case R.id.system_message_relat:
			Intent intent1 = new Intent(this, SystemMessageAct.class);
			startActivity(intent1);
			break;
		case R.id.right_img:
			Intent intent2 = new Intent(this, MessageSettingActivity.class);
			startActivity(intent2);
			break;
		default:
			break;
		}
	}
}
